﻿
import java.util.Arrays;
import java.util.Random;

public class Homework3 {
    public static void main(String[] args) {
        int[] numbers = new int[7];
        Random rand = new Random();
        while (numbers[numbers.length - 2] == 0){
            int number = rand.nextInt(33) + 1;
            for(int i=0; i< numbers.length - 1; i++){
                if(numbers[i] == 0){
                    numbers[i] = number;
                    break;
                }else if(numbers[i] == number){
                    break;
                }
            }
        }
        numbers[numbers.length - 1] = rand.nextInt(16) + 1;
        // 前6个为红球，最后一个蓝球
        System.out.println("中奖号码是：" + Arrays.toString(numbers));
    }
}
